package com.mbengue.corp.artisan.vue.menu;

import java.awt.event.KeyEvent;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class Rechercher extends JMenu {
  private static final long serialVersionUID = -2567527123783798209L;
  private final JMenu feuille;
  private final JMenuItem article;
  private final JMenuItem client;
  private JMenuItem parDate;
  private JMenuItem parNumero;
  private JMenuItem parClient;

  public Rechercher() {
    super("Rechercher");
    this.setMnemonic(KeyEvent.VK_R);
    this.feuille = new JMenu("Feuille");
    this.article = new JMenuItem("Article");
    this.client = new JMenuItem("Client");

    this.buildRechercher();
    this.setVisible(true);
  }

  private void buildRechercher() {
    this.add(this.feuille);
    this.add(this.article);
    this.add(this.client);
    this.buildFeuille();
  }

  private void buildFeuille() {
    this.parClient = new JMenuItem("Par Client");
    this.parDate = new JMenuItem("Par Date");
    this.parNumero = new JMenuItem("Par Numero");

    this.feuille.add(this.parClient);
    this.feuille.add(this.parDate);
    this.feuille.add(this.parNumero);
  }

  public JMenu getFeuille() {
    return feuille;
  }

  public JMenuItem getArticle() {
    return article;
  }

  public JMenuItem getClient() {
    return client;
  }

  public JMenuItem getParDate() {
    return parDate;
  }

  public JMenuItem getParNumero() {
    return parNumero;
  }

  public JMenuItem getParClient() {
    return parClient;
  }
}
